
package com.scalar.chiptrack.operations.process.forms;

import com.scalar.chiptrack.ChipTrackActionForm;

public class FinishedGoodsForm extends ChipTrackActionForm {

    private String m_productName = null;
    private String m_minLevel = null;
    private String m_maxLevel = null;
    private String m_reorderLevel = null;
    private String m_mftPartNumber = null;
    private String m_mktPartNumber = null;
    private String m_comments = null;
    private String[] m_locations = null;
    private int m_baseProductId = -1;
    private String m_baseProductName = null;
    private int m_previousStepId = -1;
    private int m_trackId = -1;
    private String m_stepName = null;
    private String m_previousStepName = null;
    private int m_processStepId = -1;
	private boolean is_approved=false;

    // added by hareesh on 2nd September 2003
    private String m_oldProductName = null;
    
    // added by ravikanth on 18 Sep 2003
	private String [] dupProductName = new String[0];

    public FinishedGoodsForm () {
    }
    
    public FinishedGoodsForm (String minLevel,
                             String maxLevel,
                             String reorderLevel,
                             String mftPartNumber,
                             String mktPartNumber,
                             String productName,
                             int baseProductId,
                             String stepName,
                             String comments,
                             int previousStepId) {
        m_minLevel = minLevel;
        m_maxLevel = maxLevel;
        m_reorderLevel = reorderLevel;
        m_mftPartNumber = mftPartNumber;
        m_mktPartNumber = mktPartNumber;
        m_productName = productName;
        m_baseProductId = baseProductId;
        m_stepName = stepName;
        m_comments = comments;
        m_previousStepId = previousStepId;

        // added by hareesh on 2nd September 2003
        this.m_oldProductName = this.m_productName;

    }
    
    public int getProcessStepId() {
        return m_processStepId;
    }
    public void setProcessStepId (int processStepId) {
        m_processStepId = processStepId;
    }
    
        
    public String getPreviousStepName() {
        return m_previousStepName;
    }
    public void setPreviousStepName (String previousStepName) {
        m_previousStepName = previousStepName;
    }
    
    public String getStepName() {
        return m_stepName;
    }
    public void setStepName (String stepName) {
        m_stepName = stepName;
    }
    
    public int getTrackId() {
        return m_trackId;
    }
    public void setTrackId (int trackId) {
        m_trackId = trackId;
    }

    public String getBaseProductName() {
        return m_baseProductName;
    }
    public void setBaseProductName (String baseProductName) {
        m_baseProductName = baseProductName;
    }

    public int getPreviousStepId() {
        return m_previousStepId;
    }
    public void setPreviousStepId (int stepId) {
        m_previousStepId = stepId;
    }

    public int getBaseProductId() {
        return m_baseProductId;
    }
    public void setBaseProductId (int productId) {
        m_baseProductId = productId;
    }

    public String getProductName() {
        return m_productName;
    }
    public void setProductName (String name) {
        m_productName = name;
    }

    public String getMinLevel() {
        return m_minLevel;
    }
    public int getMinLevelAsInt() {
        int minLevel = -1;
        try {
            minLevel = Integer.parseInt (m_minLevel);
        }
        catch (NumberFormatException nfe) {
            // Invalid
        }
        return minLevel;
    }
    public void setMinLevel (String level) {
        m_minLevel = level;
    }

    public String getMaxLevel() {
        return m_maxLevel;
    }
    public int getMaxLevelAsInt() {
        int maxLevel = -1;
        try {
            maxLevel = Integer.parseInt (m_maxLevel);
        }
        catch (NumberFormatException nfe) {
            // Invalid
        }
        return maxLevel;
    }
    public void setMaxLevel (String level) {
        m_maxLevel = level;
    }

    public String getReorderLevel() {
        return m_reorderLevel;
    }
    public int getReorderLevelAsInt() {
        int reorderLevel = -1;
        try {
            reorderLevel = Integer.parseInt (m_reorderLevel);
        }
        catch (NumberFormatException nfe) {
            // Invalid
        }
        return reorderLevel;
    }
    public void setReorderLevel (String reorderLevel) {
        m_reorderLevel = reorderLevel;
    }

    public String getComments() {
        return m_comments;
    }
    public void setComments (String comments) {
        m_comments = comments;
    }

    public String[] getLocations() {
        return m_locations;
    }
    public void setLocations (String[] locations) {
        m_locations = locations;
    }

    public String getMftPartNumber() {
        return m_mftPartNumber;
    }
    public void setMftPartNumber (String mftPartNumber) {
        m_mftPartNumber = mftPartNumber;
    }
    
    public String getMktPartNumber() {
        return m_mktPartNumber;
    }
    public void setMktPartNumber (String mktPartNumber) {
        m_mktPartNumber = mktPartNumber;
    }
    public void setIsApproved(boolean isApproved){
		is_approved = isApproved;
	}
	public boolean getIsApproved(){
		return is_approved;
	}

    // added by hareesh on 2nd September 2003
    // -- START --
    public void setOldProductName(String oldProductName){
            this.m_oldProductName = oldProductName;
    }
    public String getOldProductName(){
            return m_oldProductName;
    }
    // -- END --

    /**
     * @return
     */
    public String[] getDupProductName()
    {
        return dupProductName;
    }

    /**
     * @param strings
     */
    public void setDupProductName(String[] strings)
    {
        dupProductName = strings;
    }

}